﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace UniversalAdmin.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class AddUserInit7 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "details",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "exception",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<long>(
                name: "execution_time",
                table: "OperationLogs",
                type: "bigint",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "log_level",
                table: "OperationLogs",
                type: "text",
                nullable: false,
                defaultValue: "info");

            migrationBuilder.AddColumn<string>(
                name: "message",
                table: "OperationLogs",
                type: "text",
                nullable: false,
                defaultValue: "系统操作");

            migrationBuilder.AddColumn<string>(
                name: "module",
                table: "OperationLogs",
                type: "text",
                nullable: false,
                defaultValue: "SYSTEM");

            migrationBuilder.AddColumn<string>(
                name: "request_body",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "response_body",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "status_code",
                table: "OperationLogs",
                type: "integer",
                nullable: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "details",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "exception",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "execution_time",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "log_level",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "message",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "module",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "request_body",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "response_body",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "status_code",
                table: "OperationLogs");
        }
    }
}
